<?php
require_once('lib/connect_db.php');
	$array = array('status'=> null, 'message'=>null, 'data'=>null);
	$username = $_POST['username'];
	$password = $_POST['password'];
	
	$sql = "SELECT * from user where username='".$username."' and password='".$password."' ";
	$results = mysqli_query($conn,$sql);
	$count = mysqli_num_rows($results);
	if ($count>0) {
		$array['status'] = 200;
		$array['message'] = 'ok';
	}else{
		$array['status'] = 800;
		$array['message'] = 'notok';
	}
	echo json_encode($array);
	mysqli_close($conn);
